# -*- encoding:utf-8 -*-
from mako import runtime, filters, cache
UNDEFINED = runtime.UNDEFINED
__M_dict_builtin = dict
__M_locals_builtin = locals
_magic_number = 5
_modified_time = 1287001743.7554581
_template_filename='/Users/joeldunham/old/onlinelinguisticdatabase/templates/derived/settings/index.html'
_template_uri='/derived/settings/index.html'
_template_cache=cache.Cache(__name__, _modified_time)
_source_encoding='utf-8'
from webhelpers.html import escape
_exports = ['heading']


def _mako_get_namespace(context, name):
    try:
        return context.namespaces[(__name__, name)]
    except KeyError:
        _mako_generate_namespaces(context)
        return context.namespaces[(__name__, name)]
def _mako_generate_namespaces(context):
    pass
def _mako_inherit(template, context):
    _mako_generate_namespaces(context)
    return runtime._inherit_from(context, u'/base/index.html', _template_uri)
def render_body(context,**pageargs):
    context.caller_stack._push_frame()
    try:
        __M_locals = __M_dict_builtin(pageargs=pageargs)
        url = context.get('url', UNDEFINED)
        getattr = context.get('getattr', UNDEFINED)
        session = context.get('session', UNDEFINED)
        c = context.get('c', UNDEFINED)
        hasattr = context.get('hasattr', UNDEFINED)
        __M_writer = context.writer()
        # SOURCE LINE 1
        __M_writer(u'\n\n')
        # SOURCE LINE 5
        __M_writer(u'\n\n<p>This page lists the system-wide settings of the application.  Only ')
        # SOURCE LINE 8
        __M_writer(u'administrators should be permitted to alter these settings.</p>\n\n')
        # SOURCE LINE 10
        if 'user_role' in session and session['user_role'] == 'administrator':
            # SOURCE LINE 11
            __M_writer(u'<a href="')
            __M_writer(escape(url(controller='settings', action='edit')))
            __M_writer(u'" class="buttonLink" ')
            # SOURCE LINE 12
            __M_writer(u'   title="Edit the application-wide settings">edit</a>\n')
            pass
        # SOURCE LINE 14
        __M_writer(u'\n<h1 class="heading margintop">Object Language</h1>\n\n<table class="infoTable">\n    <tr>\n     <td>\n      Name\n      <p class="explanation">The name of the language under study.</p>\n     </td>\n     <td>\n      ')
        # SOURCE LINE 24
        __M_writer(escape(getattr(c.applicationSettings, 'objectLanguageName', 'unspecified')))
        __M_writer(u'\n')
        # SOURCE LINE 25
        if hasattr(c.applicationSettings, 'objectLanguageId') and \
      c.applicationSettings.objectLanguageId:
            # SOURCE LINE 27
            __M_writer(u'       <p class="explanation">ISO 639-3 ID: ')
            # SOURCE LINE 28
            __M_writer(u'       ')
            __M_writer(escape(c.applicationSettings.objectLanguageId))
            __M_writer(u'</p>\n')
            pass
        # SOURCE LINE 30
        __M_writer(u'     </td>\n    </tr>\n</table>\n\n<h1 class="heading margintop">Storage, Input &amp; Output</h1>\n\n<table class="infoTable margintop">\n    <tr>\n     <td>\n      Object Language Storage Orthography\n      <p class="explanation">The orthography used to store object language ')
        # SOURCE LINE 41
        __M_writer(u'      strings.</p>\n      <p class="explanation">All object language input will be converted from\n      the input orthography to the storage orthography for storage in the\n      database.  Similarly, all object language output will be converted from\n      the storage orthography to the output orthography.</p>\n      <p class="explanation">The storage orthography should be set when the OLD\n      application is first set up and not changed thereafter.</p>\n     </td>\n     <td>')
        # SOURCE LINE 49
        __M_writer(escape(c.OLOrthographies[c.applicationSettings.storageOrthography][0]))
        __M_writer(u'</td>\n    </tr>\n\n    <tr>\n     <td>\n      Object Language Default Input Orthography\n      <p class="explanation">The orthography that this OLD application expects ')
        # SOURCE LINE 56
        __M_writer(u'      object language data to be entered in.  This is the system-wide default, ')
        # SOURCE LINE 57
        __M_writer(u'      but each user has the option of choosing an alternate input orthography ')
        # SOURCE LINE 58
        __M_writer(u'      for themselves.</p>\n      \n')
        # SOURCE LINE 60
        if c.OLOrthographies[c.applicationSettings.defaultInputOrthography][0] \
      != c.OLOrthographies[c.applicationSettings.storageOrthography][0]:
            # SOURCE LINE 62
            __M_writer(u'      \n      <p class="explanation required">Note: this system\'s default behaviour will\n      be to treat object language input as\n      ')
            # SOURCE LINE 65
            __M_writer(escape(c.OLOrthographies[c.applicationSettings.defaultInputOrthography][0]))
            __M_writer(u'\n      and to attempt to convert it into\n      ')
            # SOURCE LINE 67
            __M_writer(escape(c.OLOrthographies[c.applicationSettings.storageOrthography][0]))
            __M_writer(u' for\n      storage.</p>\n      \n')
            pass
        # SOURCE LINE 71
        __M_writer(u'      \n     </td>\n     <td>')
        # SOURCE LINE 73
        __M_writer(escape(c.OLOrthographies[c.applicationSettings.defaultInputOrthography][0]))
        __M_writer(u'\n     </td>\n    </tr>\n    \n    <tr>\n     <td>\n      Object Language Default Output Orthography\n      <p class="explanation">The orthography that this OLD application uses to ')
        # SOURCE LINE 81
        __M_writer(u'      display object language strings.  This is the system-wide default, but ')
        # SOURCE LINE 82
        __M_writer(u'      each user has the option of choosing an alternate output orthography for ')
        # SOURCE LINE 83
        __M_writer(u'      themselves.</p>\n      \n')
        # SOURCE LINE 85
        if c.OLOrthographies[c.applicationSettings.defaultOutputOrthography][0] \
      != c.OLOrthographies[c.applicationSettings.storageOrthography][0]:
            # SOURCE LINE 87
            __M_writer(u'      \n      <p class="explanation required">Note: this system\'s default behaviour will\n      be to treat stored object language data as\n      ')
            # SOURCE LINE 90
            __M_writer(escape(c.OLOrthographies[c.applicationSettings.storageOrthography][0]))
            __M_writer(u'\n      and to attempt to convert it into\n      ')
            # SOURCE LINE 92
            __M_writer(escape(c.OLOrthographies[c.applicationSettings.defaultOutputOrthography][0]))
            __M_writer(u'\n      for display.</p>\n      \n')
            pass
        # SOURCE LINE 96
        __M_writer(u'      \n     </td>\n     <td>')
        # SOURCE LINE 98
        __M_writer(escape(c.OLOrthographies[c.applicationSettings.defaultOutputOrthography][0]))
        __M_writer(u'\n     </td>\n    </tr>\n</table>\n\n<a href="')
        # SOURCE LINE 103
        __M_writer(escape(url(controller='settings', action='orthography')))
        __M_writer(u'" class="buttonLink" ')
        # SOURCE LINE 104
        __M_writer(u'   title="More about object language orthographies">More on Orthographies ...</a>\n\n<h1 class="heading margintop">Object Language Orthography(/ies)</h1>\n\n<table class="infoTable">\n')
        # SOURCE LINE 109
        for key in c.OLOrthographies:
            # SOURCE LINE 110
            if c.OLOrthographies[key][0] and c.OLOrthographies[key][1]:
                # SOURCE LINE 111
                __M_writer(u'    <tr>\n     <td>\n      ')
                # SOURCE LINE 113
                __M_writer(escape(c.OLOrthographies[key][0]))
                __M_writer(u'\n      <p class="explanation">\n        An orthography for entering object language strings.\n      </p>\n     </td>\n     <td>\n      ')
                # SOURCE LINE 119
                __M_writer(escape(c.OLOrthographies[key][1]))
                __M_writer(u'\n     </td>\n    </tr>\n')
                pass
            pass
        # SOURCE LINE 124
        __M_writer(u'</table>\n\n<h1 class="heading margintop">Object Language Strings</h1>\n\n<table class="infoTable">\n    \n    <tr>\n     <td>\n      Pure Object Language Fields\n      <p class="explanation">The system assumes that these fields contain\n      nothing but strings of the object language.  The data in these fields may\n      be converted from one orthography to another depending on system-wide and\n      user-specific settings.\n      </p>\n     </td>\n     <td>\n      <ul>\n        <li>Form transcriptions</li>\n')
        # SOURCE LINE 142
        if c.applicationSettings.morphemeBreakIsObjectLanguageString == u'yes':
            # SOURCE LINE 143
            __M_writer(u'        <li>Form morpheme breaks</li>\n')
            pass
        # SOURCE LINE 145
        __M_writer(u'      </ul>\n     </td>\n    </tr>\n\n    <tr>\n     <td>\n      Partial Object Language Fields\n      <p class="explanation">The system assumes that these fields may contain\n      substrings enclosed in object language tags (\'&lt;obl&gt;\' to the left and\n      \'&lt;/obl&gt;\' to the right) and that these substrings are strings of the object\n      language.  These substrings may be converted from one orthography to\n      another depending on system-wide and user-specific settings.\n      </p>\n     </td>\n     <td>\n      <ul>\n        <li>Form general comments</li>\n        <li>Form speaker comments</li>\n      </ul>\n     </td>\n    </tr>\n    \n</table>\n\n<h1 class="heading margintop">Metalanguage</h1>\n\n<table class="infoTable">\n    <tr>\n     <td>\n      Metalanguage\n      <p class="explanation">language used in the glossing and analysis of the ')
        # SOURCE LINE 176
        __M_writer(u'      object language</p>\n     </td>\n     <td>\n      ')
        # SOURCE LINE 179
        __M_writer(escape(getattr(c.applicationSettings, 'metaLanguageName', 'unspecified')))
        __M_writer(u'\n')
        # SOURCE LINE 180
        if hasattr(c.applicationSettings, 'metaLanguageId'):
            # SOURCE LINE 181
            __M_writer(u'       <p class="explanation">ISO 639-3 ID: ')
            # SOURCE LINE 182
            __M_writer(u'       ')
            __M_writer(escape(c.applicationSettings.metaLanguageId))
            __M_writer(u'</p>\n')
            pass
        # SOURCE LINE 184
        __M_writer(u'     </td>\n    </tr>\n    \n    <tr>\n     <td>\n      Metalanguage Orthography\n      <p class="explanation">graphs of the metalanguage</p>\n     </td>\n     <td>\n        ')
        # SOURCE LINE 193
        __M_writer(escape(c.MLOrthographyTable))
        __M_writer(u'\n     </td>\n    </tr>\n</table>\n\n<h1 class="heading margintop">Appearance</h1>\n\n<table class="infoTable">    \n    <tr>\n     <td>\n      Header Image\n      <p class="explanation">name of a File to use in the header/banner of the ')
        # SOURCE LINE 205
        __M_writer(u'      application</p>\n     </td>\n     <td>\n')
        # SOURCE LINE 208
        if c.applicationSettings.headerImageName:
            # SOURCE LINE 209
            __M_writer(u'            ')
            __M_writer(escape(c.applicationSettings.headerImageName))
            __M_writer(u'\n')
            # SOURCE LINE 210
        else:
            # SOURCE LINE 211
            __M_writer(u'            unspecified\n')
            pass
        # SOURCE LINE 213
        __M_writer(u'     </td>\n    </tr>\n\n    <tr>\n     <td>\n      CSS Colors\n      <p class="explanation">choose a CSS file for the color scheme of the ')
        # SOURCE LINE 220
        __M_writer(u'      application</p>\n     </td>\n     <td>\n')
        # SOURCE LINE 223
        if c.applicationSettings.colorsCSS:
            # SOURCE LINE 224
            __M_writer(u'            ')
            __M_writer(escape(c.applicationSettings.colorsCSS))
            __M_writer(u'\n')
            # SOURCE LINE 225
        else:
            # SOURCE LINE 226
            __M_writer(u'            unspecified\n')
            pass
        # SOURCE LINE 228
        __M_writer(u'     </td>\n    </tr>\n</table>\n\n<h1 class="heading margintop">Database</h1>\n\n<table class="infoTable">\n    <tr>\n     <td>\n      RDBMS\n      <p class="explanation">type of RDBMS (relational database management ')
        # SOURCE LINE 239
        __M_writer(u'      system) being used.\n      </p>\n     </td>\n     <td>')
        # SOURCE LINE 242
        __M_writer(escape(c.rdbms))
        __M_writer(u'</td>\n    </tr>\n    \n    <tr>\n     <td>\n      Database Name\n      <p class="explanation">name of RDBMS database being used.</p>\n     </td>\n     <td>')
        # SOURCE LINE 250
        __M_writer(escape(c.databaseName))
        __M_writer(u'</td>\n    </tr>\n</table>\n\n')
        # SOURCE LINE 254
        if 'user_role' in session and session['user_role'] == 'administrator':
            # SOURCE LINE 255
            __M_writer(u'<a href="')
            __M_writer(escape(url(controller='settings', action='edit')))
            __M_writer(u'" class="buttonLink" ')
            # SOURCE LINE 256
            __M_writer(u'   title="Edit the application-wide settings">edit</a>\n')
            pass
        return ''
    finally:
        context.caller_stack._pop_frame()


def render_heading(context):
    context.caller_stack._push_frame()
    try:
        __M_writer = context.writer()
        # SOURCE LINE 3
        __M_writer(u'\n    <h1 class="heading">Application Settings</h1>\n')
        return ''
    finally:
        context.caller_stack._pop_frame()


